<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>弓友之家</title>
    <link rel="stylesheet" href="css/mui.css" />
    <link rel="stylesheet" href="fonts/iconfont.css" />
    <link rel="stylesheet" href="css/style.css" />
    <style>
    	.mui-slider-indicator{bottom: 8px;}
    	.game-rank .title{font-weight: 400; padding: 10px 0; font-size: 17px; color: #1A1A1A;}
    </style>
</head>
<body>
	<header class="mui-bar mui-bar-nav">
		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		<h1 class="mui-title">荣誉墙</h1>
		<a class="mui-icon mui-icon-more-filled mui-pull-right shareBtn"></a>
	</header>
	<div class="mui-content">
		<!--轮播图-->
		<div id="slider" class="mui-slider" >
			<div class="mui-slider-group mui-slider-loop">
				
			</div>
			<div class="mui-slider-indicator">
				
			</div>
		</div>
		<!--<style>
			.zanz-img .mui-col-xs-6{padding: 10px 10px 0;}
			.zanz-img img{width: 100%;}
		</style>
		<div class="zanz-img mui-row">
			<div class="mui-col-xs-6"><img src="" class="img_per"/></div>
			<div class="mui-col-xs-6"><img src="" class="img_team"/></div>
		</div>-->
		<!--<div class="honor-title mui-row mui-text-center"> 
			<div class="mui-col-xs-6"><a onclick="window.location.href='honor-person.html'">个人赛年度排行榜</a></div>
			<div class="mui-col-xs-6"><a onclick="window.location.href='honor-team.html'">团体赛年度排行榜</a></div>
		</div>-->
		<div class="game-rank mui-text-center">
			<h4 class="title"></h4>
			<div class="sex-class">
				<a href="javacsript:void(0)" class="on">男子组</a>
				<a href="javascript:void(0)">女子组</a>
			</div>
			<div class="sex-con">
				<div class="con boy">
					<div class="game-rank mui-text-center">
						<div class="rank rank1">
							
						</div>
						<div class="mui-row row1">
							
						</div>
						<div class="mui-row row2">
							
						</div>
						<div class="mui-row  row3">
							
						</div>
					</div>
				</div>
				<div class="con girl mui-hidden">
					<div class="game-rank mui-text-center">
						<div class="rank rank1">
							
						</div>
						<div class="mui-row row1">
							
						</div>
						<div class="mui-row row2">
							
						</div>
						<div class="mui-row  row3">
							
						</div>
					</div>
				</div>
			</div>
		</div>
		
	</div>
	<!--分享-->
	<div class="shareWx mui-hidden"> 
		<ul class="mui-list-unstyled">
			<li class="tel"><a href="javascript:void(0)" onclick="shareWeixinMessage(1)">微信好友</a></li>
			<li class="qq"><a href="javascript:void(0)" onclick="shareWeixinMessage(2)">朋友圈</a></li>
		</ul>
		<button type="button" class="cancleShare">取消</button>
	</div>
	<script type="text/javascript" src="js/mui.min.js" ></script>
	<script type="text/javascript" src="js/jquery-1.8.3.min.js" ></script>
	<script type="text/javascript" src="js/common.js" ></script>
	<script type="text/javascript" src="js/mui.zoom.js" ></script>
	<script type="text/javascript" src="js/mui.previewimage.js" ></script>
	<script type="text/javascript" charset="utf-8">
      	mui.init();
      	//赞助商
//    	mui.ajax(H_SRC+'/amier/index/sponsor',{
//			data:{
//				token:token
//			},
//			dataType:'json',
//			type:'post',
//			timeout:10000,             
//			success:function(data){
//				var dataurl=data.data;
//				$(".img_per").attr("src",H_SRC+dataurl.img_personal)
//				$(".img_team").attr("src",H_SRC+dataurl.img_team)
//			},
//			error:function(){
//				
//			}
//		}) 
      	var tit="",des="",img="";
      	mui.ajax(H_SRC+'/amier/index/honor_',{
			data:{
				token:token
			},
			dataType:'json',
			type:'post',
			timeout:10000,             
			success:function(data){
				var dataurl=data.data;
				if(data.code == 1){
					//轮播图
					var lb="",dot="";
					lb+='<div class="mui-slider-item mui-slider-item-duplicate"><img src="'+H_SRC+''+dataurl.lunbo[dataurl.lunbo.length-1].img_url+'"></div>'
					for(var i=0;i<dataurl.lunbo.length;i++){
						lb+='<div class="mui-slider-item"><img src="'+H_SRC+''+dataurl.lunbo[i].img_url+'" /></div>';
						dot+='<div class="mui-indicator"></div>';
					}
					lb+='<div class="mui-slider-item mui-slider-item-duplicate"><img src="'+H_SRC+''+dataurl.lunbo[0].img_url+'"></div>';
					$(".mui-slider-group").html(lb);
					$(".mui-slider-indicator").html(dot);
					var href="";
					$(".mui-slider-group").on("tap","a",function(){
						gid=$(this).attr("data-href");
						mui.openWindow({
							url:'goods-list-page.html',
							id:'goods-list-page.html',
							createNew:true,
							show: {
								autoShow: true,
								aniShow: 'slide-in-right',
								duration: 200,
							},
							extras:{
								gid:gid
							}
						});
					})
					var slider = mui("#slider");
      				slider.slider({interval: 4000}); 
      				
      				tit=data.share_msg.share_title;
					des=data.share_msg.share_desc;
					img=H_SRC+data.share_msg.share_pic;
      				
      				//排名
      				$(".game-rank .title").html(dataurl.match_name)
      				//女子组
      				var rank1="";
      				rank1+='<dl><a>';
					rank1+='<dt><img src="'+H_SRC+''+dataurl.girls[0].head_pic+'" data-preview-src="" data-preview-group="3"/></dt>';
					rank1+='<dd><h4 class="mui-ellipsis">'+dataurl.girls[0].realName+'</h4><p class="mui-ellipsis">'+dataurl.girls[0].ranking_name+'</p><span href="javascript:void(0)" data-id="'+dataurl.girls[0].member_id+'">查看详情</span></a></dl>';
      				$(".girl .rank1").html(rank1);
      				var rank2="";
      				for(var i=1;i<3;i++){
      					rank2+='<div class="mui-col-xs-6"><div class="rank rank2"><dl><a>';
						rank2+='<dt><img src="'+H_SRC+''+dataurl.girls[i].head_pic+'" data-preview-src="" data-preview-group="3"/></dt>';
						rank2+='<dd><h4 class="mui-ellipsis">'+dataurl.girls[i].realName+'</h4><p class="mui-ellipsis">'+dataurl.girls[i].ranking_name+'</p><span href="javascript:void(0)" data-id="'+dataurl.girls[i].member_id+'">查看详情</span>';
						rank2+='</dd></a></dl></div></div>';
      				}
      				$(".girl .row1").html(rank2); 
      				if(dataurl.girls.length>3){
      					var rank3="";
	      				for(var i=3;i<6;i++){
	      					rank3+='<div class="mui-col-xs-4"><div class="rank rank3"><dl><a>';
							rank3+='<dt><img src="'+H_SRC+''+dataurl.girls[i].head_pic+'" data-preview-src="" data-preview-group="1"/></dt>';
							rank3+='<dd><h4 class="mui-ellipsis">'+dataurl.girls[i].realName+'</h4><p class="mui-ellipsis">'+dataurl.girls[i].ranking_name+'</p><span href="javascript:void(0)" data-id="'+dataurl.girls[i].member_id+'">查看详情</span>';
							rank3+='</dd></a></dl></div></div>';
	      				}
	      				$(".girl .row2").html(rank3);
      				}
      				if(dataurl.girls.length>6){
      					var rank4="";
	      				for(var i=6;i<dataurl.girls.length;i++){
	      					rank4+='<div class="mui-col-xs-3"><div class="rank rank4"><dl><a>';
							rank4+='<dt><img src="'+H_SRC+''+dataurl.girls[i].head_pic+'" data-preview-src="" data-preview-group="1"/></dt>';
							rank4+='<dd><h4 class="mui-ellipsis">'+dataurl.girls[i].realName+'</h4><p class="mui-ellipsis">'+dataurl.girls[i].ranking_name+'</p><span href="javascript:void(0)" data-id="'+dataurl.girls[i].member_id+'">查看详情</span>';
							rank4+='</dd></a></dl></div></div>';
	      				}
	      				$(".girl .row3").html(rank4);
      				}
      				
      				//男子组
      				var rank1="";
      				rank1+='<dl><a>';
					rank1+='<dt><img src="'+H_SRC+''+dataurl.boys[0].head_pic+'" data-preview-src="" data-preview-group="1"/></dt>';
					rank1+='<dd><h4 class="mui-ellipsis">'+dataurl.boys[0].realName+'</h4><p class="mui-ellipsis">'+dataurl.boys[0].ranking_name+'</p><span href="javascript:void(0)" data-id="'+dataurl.boys[0].member_id+'">查看详情</span></a></dl>';
      				$(".boy .rank1").html(rank1);
      				var rank2="";
      				for(var i=1;i<3;i++){
      					rank2+='<div class="mui-col-xs-6"><div class="rank rank2"><dl><a>';
						rank2+='<dt><img src="'+H_SRC+''+dataurl.boys[i].head_pic+'" data-preview-src="" data-preview-group="1"/></dt>';
						rank2+='<dd><h4 class="mui-ellipsis">'+dataurl.boys[i].realName+'</h4><p class="mui-ellipsis">'+dataurl.boys[i].ranking_name+'</p><span href="javascript:void(0)" data-id="'+dataurl.boys[i].member_id+'">查看详情</span>';
						rank2+='</dd></a></dl></div></div>';
      				}
      				$(".boy .row1").html(rank2);
      				var rank3="";
      				for(var i=3;i<6;i++){
      					rank3+='<div class="mui-col-xs-4"><div class="rank rank3"><dl><a>';
						rank3+='<dt><img src="'+H_SRC+''+dataurl.boys[i].head_pic+'" data-preview-src="" data-preview-group="1"/></dt>';
						rank3+='<dd><h4 class="mui-ellipsis">'+dataurl.boys[i].realName+'</h4><p class="mui-ellipsis">'+dataurl.boys[i].ranking_name+'</p><span href="javascript:void(0)" data-id="'+dataurl.boys[i].member_id+'">查看详情</span>';
						rank3+='</dd></a></dl></div></div>';
      				}
      				$(".boy .row2").html(rank3);
      				if(dataurl.boys.length>6){
      					var rank4="";
	      				for(var i=6;i<dataurl.boys.length;i++){
	      					rank4+='<div class="mui-col-xs-3"><div class="rank rank4"><dl><a>';
							rank4+='<dt><img src="'+H_SRC+''+dataurl.boys[i].head_pic+'" data-preview-src="" data-preview-group="1"/></dt>';
							rank4+='<dd><h4 class="mui-ellipsis">'+dataurl.boys[i].realName+'</h4><p class="mui-ellipsis">'+dataurl.boys[i].ranking_name+'</p><span href="javascript:void(0)" data-id="'+dataurl.boys[i].member_id+'">查看详情</span>';
							rank4+='</dd></a></dl></div></div>';
	      				}
	      				$(".boy .row3").html(rank4);
      				}
      				
      				mui.previewImage();
      				$(".sex-con").on("tap","span",function(){
						var mid=$(this).attr("data-id");
						mui.openWindow({ 
							url:'integralrank-page.html',
							id:'integralrank-page.html',
							createNew:true, 
							show: {
								autoShow: true,
								aniShow: 'slide-in-right',
								duration: 200,
							},
							extras:{
								mid:mid
							}
						});
					})
				}else{
					mui.toast(data.msg);
				}
			},
			error:function(){
				
			}
		}) 
      	
      	$(".sex-class a").on("tap",function(){
      		var a=$(this).index();
      		$(this).addClass("on").siblings().removeClass("on");
      		$(".sex-con .con").eq(a).removeClass("mui-hidden").siblings().addClass("mui-hidden");
      	})
      	
      	mui.previewImage();
      	var slider = mui("#slider");
      	slider.slider({interval: 5000});
      	
      	function shareWeixinMessage(type){
			var type=type;
			if(type==1){
				var secne="WXSceneSession"
			}else{
				var secne="WXSceneTimeline"
			}
			sharewx.send( 
				{ 
					title:tit,
					content:des, 
					href:H_SRC+'/honor_wall',
					thumbs: [img], 
		        	pictures: [img], 
					extra:{scene:secne}
				}, 
				function(){
					mask.close();
					$(".shareWx").addClass("mui-hidden");
					mui.toast( "分享成功！" );
				}, function(e){
					mask.close();
					$(".shareWx").addClass("mui-hidden");
					mui.toast( "取消分享");
				}
			);
		}
    </script>
</body>
</html>